/**
 * 
 */
package com.dsteiner.xelavos.client.model;

import java.beans.PropertyChangeListener;

import com.dsteiner.widgets.client.PropertyChangeCollection;
import com.dsteiner.xelavos.client.model.MainTabModel.Tab;
import com.google.gwt.user.client.ui.AbstractImagePrototype;

public class TabModel {
	private PropertyChangeCollection propertyChangeSupport = new PropertyChangeCollection(
			this);

	public void addPropertyChangeListener(String propertyName,
			PropertyChangeListener listener) {
		propertyChangeSupport.registerPropertyChangeListener(propertyName,
				listener);
	}
	
	private Tab tab;

	public Tab getTab() {
		return tab;
	}

	public void setTab(Tab tab) {
		Tab oldTab = this.tab;
		this.tab = tab;
		propertyChangeSupport.firePropertyChange("tabId", oldTab, tab);
	}
	private AbstractImagePrototype image;

	public AbstractImagePrototype getImage() {
		return image;
	}

	public void setImage(AbstractImagePrototype image) {
		AbstractImagePrototype oldImage = this.image;
		this.image = image;
		propertyChangeSupport.firePropertyChange("image", oldImage, image);
	}
	private String text;

	public String getText() {
		return text;
	}

	public void setText(String text) {
		String oldText = this.text;
		this.text = text;
		propertyChangeSupport.firePropertyChange("text", oldText, text);
	}
}